<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:c="http://java.sun.com/jsp/jstl/core"
	xmlns:forgeview="http://jboss.org/forge/view"	
	template="/resources/scaffold/pageTemplate.xhtml">

	<f:metadata>
		<f:viewParam name="id" value="#{sdSaleOrderBean.id}"/>
		<f:event type="preRenderView" listener="#{sdSaleOrderBean.retrieve}"/>
	</f:metadata>

	<ui:param name="pageTitle" value="Create Sd Sale Order"/>

	<ui:define name="header">
		Sd Sale Order
	</ui:define>

	<ui:define name="subheader">
		<c:choose>
			<c:when test="#{!empty sdSaleOrderBean.id}">
				Edit existing Sd Sale Order
			</c:when>
			<c:otherwise>
				Create a new Sd Sale Order
			</c:otherwise>
		</c:choose>
	</ui:define>

	<ui:define name="footer"/>

	<ui:define name="main">
		<h:form id="create">
			<h:messages globalOnly="true" styleClass="error"/>

			<h:panelGrid columnClasses="label,component,required" columns="3">
				<h:outputLabel for="sdSaleOrderBeanSdSaleOrderSoNo" value="So No:"/>
				<h:panelGroup>
					<h:inputText id="sdSaleOrderBeanSdSaleOrderSoNo" required="true" value="#{sdSaleOrderBean.sdSaleOrder.soNo}"/>
					<h:message for="sdSaleOrderBeanSdSaleOrderSoNo" styleClass="error"/>
				</h:panelGroup>
				<h:outputText value="*"/>
				<h:outputLabel for="sdSaleOrderBeanSdSaleOrderSysTermOfPayment" value="Sys Term Of Payment:"/>
				<h:panelGroup>
					<h:selectOneMenu converter="#{sysTermOfPaymentBean.converter}" id="sdSaleOrderBeanSdSaleOrderSysTermOfPayment" value="#{sdSaleOrderBean.sdSaleOrder.sysTermOfPayment}">
						<f:selectItem/>
						<f:selectItems itemLabel="#{forgeview:display(_item)}" itemValue="#{_item}" value="#{sysTermOfPaymentBean.all}" var="_item"/>
					</h:selectOneMenu>
					<h:message for="sdSaleOrderBeanSdSaleOrderSysTermOfPayment" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="sdSaleOrderBeanSdSaleOrderSdSaleOrderStatus" value="Sd Sale Order Status:"/>
				<h:panelGroup>
					<h:selectOneMenu converter="#{sdSaleOrderStatusBean.converter}" id="sdSaleOrderBeanSdSaleOrderSdSaleOrderStatus" value="#{sdSaleOrderBean.sdSaleOrder.sdSaleOrderStatus}">
						<f:selectItem/>
						<f:selectItems itemLabel="#{forgeview:display(_item)}" itemValue="#{_item}" value="#{sdSaleOrderStatusBean.all}" var="_item"/>
					</h:selectOneMenu>
					<h:message for="sdSaleOrderBeanSdSaleOrderSdSaleOrderStatus" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="sdSaleOrderBeanSdSaleOrderSdCust" value="Sd Cust:"/>
				<h:panelGroup>
					<h:selectOneMenu converter="#{sdCustBean.converter}" id="sdSaleOrderBeanSdSaleOrderSdCust" value="#{sdSaleOrderBean.sdSaleOrder.sdCust}">
						<f:selectItem/>
						<f:selectItems itemLabel="#{forgeview:display(_item)}" itemValue="#{_item}" value="#{sdCustBean.all}" var="_item"/>
					</h:selectOneMenu>
					<h:message for="sdSaleOrderBeanSdSaleOrderSdCust" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="sdSaleOrderBeanSdSaleOrderSysTitleName" value="Sys Title Name:"/>
				<h:panelGroup>
					<h:selectOneMenu converter="#{sysTitleNameBean.converter}" id="sdSaleOrderBeanSdSaleOrderSysTitleName" value="#{sdSaleOrderBean.sdSaleOrder.sysTitleName}">
						<f:selectItem/>
						<f:selectItems itemLabel="#{forgeview:display(_item)}" itemValue="#{_item}" value="#{sysTitleNameBean.all}" var="_item"/>
					</h:selectOneMenu>
					<h:message for="sdSaleOrderBeanSdSaleOrderSysTitleName" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="sdSaleOrderBeanSdSaleOrderSdCustType" value="Sd Cust Type:"/>
				<h:panelGroup>
					<h:selectOneMenu converter="#{sdCustTypeBean.converter}" id="sdSaleOrderBeanSdSaleOrderSdCustType" value="#{sdSaleOrderBean.sdSaleOrder.sdCustType}">
						<f:selectItem/>
						<f:selectItems itemLabel="#{forgeview:display(_item)}" itemValue="#{_item}" value="#{sdCustTypeBean.all}" var="_item"/>
					</h:selectOneMenu>
					<h:message for="sdSaleOrderBeanSdSaleOrderSdCustType" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="sdSaleOrderBeanSdSaleOrderSdQuotation" value="Sd Quotation:"/>
				<h:panelGroup>
					<h:selectOneMenu converter="#{sdQuotationBean.converter}" id="sdSaleOrderBeanSdSaleOrderSdQuotation" value="#{sdSaleOrderBean.sdSaleOrder.sdQuotation}">
						<f:selectItem/>
						<f:selectItems itemLabel="#{forgeview:display(_item)}" itemValue="#{_item}" value="#{sdQuotationBean.all}" var="_item"/>
					</h:selectOneMenu>
					<h:message for="sdSaleOrderBeanSdSaleOrderSdQuotation" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="sdSaleOrderBeanSdSaleOrderSoCode" value="So Code:"/>
				<h:panelGroup>
					<h:inputText id="sdSaleOrderBeanSdSaleOrderSoCode" maxLength="50" required="true" value="#{sdSaleOrderBean.sdSaleOrder.soCode}"/>
					<h:message for="sdSaleOrderBeanSdSaleOrderSoCode" styleClass="error"/>
				</h:panelGroup>
				<h:outputText value="*"/>
				<h:outputLabel for="sdSaleOrderBeanSdSaleOrderSoDescr" value="So Descr:"/>
				<h:panelGroup>
					<h:inputText id="sdSaleOrderBeanSdSaleOrderSoDescr" maxLength="100" required="true" value="#{sdSaleOrderBean.sdSaleOrder.soDescr}"/>
					<h:message for="sdSaleOrderBeanSdSaleOrderSoDescr" styleClass="error"/>
				</h:panelGroup>
				<h:outputText value="*"/>
				<h:outputLabel for="sdSaleOrderBeanSdSaleOrderSoDate" value="So Date:"/>
				<h:panelGroup>
					<h:inputText id="sdSaleOrderBeanSdSaleOrderSoDate" maxLength="10" required="true" value="#{sdSaleOrderBean.sdSaleOrder.soDate}">
						<f:convertDateTime type="date"/>
					</h:inputText>
					<h:message for="sdSaleOrderBeanSdSaleOrderSoDate" styleClass="error"/>
				</h:panelGroup>
				<h:outputText value="*"/>
				<h:outputLabel for="sdSaleOrderBeanSdSaleOrderSoRefCustPoNo" value="So Ref Cust Po No:"/>
				<h:panelGroup>
					<h:inputText id="sdSaleOrderBeanSdSaleOrderSoRefCustPoNo" maxLength="30" value="#{sdSaleOrderBean.sdSaleOrder.soRefCustPoNo}"/>
					<h:message for="sdSaleOrderBeanSdSaleOrderSoRefCustPoNo" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="sdSaleOrderBeanSdSaleOrderSoCustCode" value="So Cust Code:"/>
				<h:panelGroup>
					<h:inputText id="sdSaleOrderBeanSdSaleOrderSoCustCode" maxLength="50" value="#{sdSaleOrderBean.sdSaleOrder.soCustCode}"/>
					<h:message for="sdSaleOrderBeanSdSaleOrderSoCustCode" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="sdSaleOrderBeanSdSaleOrderSoCustFirstName" value="So Cust First Name:"/>
				<h:panelGroup>
					<h:inputText id="sdSaleOrderBeanSdSaleOrderSoCustFirstName" maxLength="50" value="#{sdSaleOrderBean.sdSaleOrder.soCustFirstName}"/>
					<h:message for="sdSaleOrderBeanSdSaleOrderSoCustFirstName" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="sdSaleOrderBeanSdSaleOrderSoCustMidName" value="So Cust Mid Name:"/>
				<h:panelGroup>
					<h:inputText id="sdSaleOrderBeanSdSaleOrderSoCustMidName" maxLength="50" value="#{sdSaleOrderBean.sdSaleOrder.soCustMidName}"/>
					<h:message for="sdSaleOrderBeanSdSaleOrderSoCustMidName" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="sdSaleOrderBeanSdSaleOrderSoCustLastName" value="So Cust Last Name:"/>
				<h:panelGroup>
					<h:inputText id="sdSaleOrderBeanSdSaleOrderSoCustLastName" maxLength="50" value="#{sdSaleOrderBean.sdSaleOrder.soCustLastName}"/>
					<h:message for="sdSaleOrderBeanSdSaleOrderSoCustLastName" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="sdSaleOrderBeanSdSaleOrderSoCustIdCardNo" value="So Cust Id Card No:"/>
				<h:panelGroup>
					<h:inputText id="sdSaleOrderBeanSdSaleOrderSoCustIdCardNo" maxLength="20" value="#{sdSaleOrderBean.sdSaleOrder.soCustIdCardNo}"/>
					<h:message for="sdSaleOrderBeanSdSaleOrderSoCustIdCardNo" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="sdSaleOrderBeanSdSaleOrderSoTermOfPaymentDescr" value="So Term Of Payment Descr:"/>
				<h:panelGroup>
					<h:inputText id="sdSaleOrderBeanSdSaleOrderSoTermOfPaymentDescr" maxLength="300" value="#{sdSaleOrderBean.sdSaleOrder.soTermOfPaymentDescr}"/>
					<h:message for="sdSaleOrderBeanSdSaleOrderSoTermOfPaymentDescr" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="sdSaleOrderBeanSdSaleOrderSoDiscountPerc" value="So Discount Perc:"/>
				<h:panelGroup>
					<h:inputText id="sdSaleOrderBeanSdSaleOrderSoDiscountPerc" required="true" value="#{sdSaleOrderBean.sdSaleOrder.soDiscountPerc}"/>
					<h:message for="sdSaleOrderBeanSdSaleOrderSoDiscountPerc" styleClass="error"/>
				</h:panelGroup>
				<h:outputText value="*"/>
				<h:outputLabel for="sdSaleOrderBeanSdSaleOrderSoDiscountVal" value="So Discount Val:"/>
				<h:panelGroup>
					<h:inputText id="sdSaleOrderBeanSdSaleOrderSoDiscountVal" required="true" value="#{sdSaleOrderBean.sdSaleOrder.soDiscountVal}"/>
					<h:message for="sdSaleOrderBeanSdSaleOrderSoDiscountVal" styleClass="error"/>
				</h:panelGroup>
				<h:outputText value="*"/>
				<h:outputLabel for="sdSaleOrderBeanSdSaleOrderSoDiscountTotal" value="So Discount Total:"/>
				<h:panelGroup>
					<h:inputText id="sdSaleOrderBeanSdSaleOrderSoDiscountTotal" required="true" value="#{sdSaleOrderBean.sdSaleOrder.soDiscountTotal}"/>
					<h:message for="sdSaleOrderBeanSdSaleOrderSoDiscountTotal" styleClass="error"/>
				</h:panelGroup>
				<h:outputText value="*"/>
				<h:outputLabel for="sdSaleOrderBeanSdSaleOrderSoStatusIncVat" value="So Status Inc Vat:"/>
				<h:panelGroup>
					<h:inputText id="sdSaleOrderBeanSdSaleOrderSoStatusIncVat" required="true" value="#{sdSaleOrderBean.sdSaleOrder.soStatusIncVat}"/>
					<h:message for="sdSaleOrderBeanSdSaleOrderSoStatusIncVat" styleClass="error"/>
				</h:panelGroup>
				<h:outputText value="*"/>
				<h:outputLabel for="sdSaleOrderBeanSdSaleOrderSoVatPercVal" value="So Vat Perc Val:"/>
				<h:panelGroup>
					<h:inputText id="sdSaleOrderBeanSdSaleOrderSoVatPercVal" required="true" value="#{sdSaleOrderBean.sdSaleOrder.soVatPercVal}"/>
					<h:message for="sdSaleOrderBeanSdSaleOrderSoVatPercVal" styleClass="error"/>
				</h:panelGroup>
				<h:outputText value="*"/>
				<h:outputLabel for="sdSaleOrderBeanSdSaleOrderSoTotalPriceExcVat" value="So Total Price Exc Vat:"/>
				<h:panelGroup>
					<h:inputText id="sdSaleOrderBeanSdSaleOrderSoTotalPriceExcVat" required="true" value="#{sdSaleOrderBean.sdSaleOrder.soTotalPriceExcVat}"/>
					<h:message for="sdSaleOrderBeanSdSaleOrderSoTotalPriceExcVat" styleClass="error"/>
				</h:panelGroup>
				<h:outputText value="*"/>
				<h:outputLabel for="sdSaleOrderBeanSdSaleOrderSoTotalVat" value="So Total Vat:"/>
				<h:panelGroup>
					<h:inputText id="sdSaleOrderBeanSdSaleOrderSoTotalVat" required="true" value="#{sdSaleOrderBean.sdSaleOrder.soTotalVat}"/>
					<h:message for="sdSaleOrderBeanSdSaleOrderSoTotalVat" styleClass="error"/>
				</h:panelGroup>
				<h:outputText value="*"/>
				<h:outputLabel for="sdSaleOrderBeanSdSaleOrderSoTotalPrice" value="So Total Price:"/>
				<h:panelGroup>
					<h:inputText id="sdSaleOrderBeanSdSaleOrderSoTotalPrice" required="true" value="#{sdSaleOrderBean.sdSaleOrder.soTotalPrice}"/>
					<h:message for="sdSaleOrderBeanSdSaleOrderSoTotalPrice" styleClass="error"/>
				</h:panelGroup>
				<h:outputText value="*"/>
				<h:outputLabel for="sdSaleOrderBeanSdSaleOrderSdSaleOrderCustAddrs" value="Sd Sale Order Cust Addrs:"/>
				<h:panelGroup>
					<ui:param name="_collection" value="#{sdSaleOrderBean.sdSaleOrder.sdSaleOrderCustAddrs}"/>
					<h:dataTable id="sdSaleOrderBeanSdSaleOrderSdSaleOrderCustAddrs" styleClass="data-table" value="#{forgeview:asList(_collection)}" var="_item">
						<h:column>
							<f:facet name="header">
								<h:outputText value="Sys Addr 01"/>
							</f:facet>
							<h:link outcome="/sdSaleOrderCustAddr/view">
								<f:param name="id" value="#{_item.id}"/>
								<h:outputText id="forgeviewdisplayitemSysAddr01" value="#{forgeview:display(_item.sysAddr01)}"/>
							</h:link>
							<f:facet name="footer">
								<h:selectOneMenu converter="#{sysAddr01Bean.converter}" id="sdSaleOrderCustAddrBeanAddSysAddr01" value="#{sdSaleOrderCustAddrBean.add.sysAddr01}">
									<f:selectItem/>
									<f:selectItems itemLabel="#{forgeview:display(_item)}" itemValue="#{_item}" value="#{sysAddr01Bean.all}" var="_item"/>
								</h:selectOneMenu>
								<h:message for="sdSaleOrderCustAddrBeanAddSysAddr01" styleClass="error"/>
							</f:facet>
						</h:column>
						<h:column>
							<f:facet name="header">
								<h:outputText value="Sys Addr Type"/>
							</f:facet>
							<h:link outcome="/sdSaleOrderCustAddr/view">
								<f:param name="id" value="#{_item.id}"/>
								<h:outputText id="forgeviewdisplayitemSysAddrType" value="#{forgeview:display(_item.sysAddrType)}"/>
							</h:link>
							<f:facet name="footer">
								<h:selectOneMenu converter="#{sysAddrTypeBean.converter}" id="sdSaleOrderCustAddrBeanAddSysAddrType" value="#{sdSaleOrderCustAddrBean.add.sysAddrType}">
									<f:selectItem/>
									<f:selectItems itemLabel="#{forgeview:display(_item)}" itemValue="#{_item}" value="#{sysAddrTypeBean.all}" var="_item"/>
								</h:selectOneMenu>
								<h:message for="sdSaleOrderCustAddrBeanAddSysAddrType" styleClass="error"/>
							</f:facet>
						</h:column>
						<h:column>
							<f:facet name="header">
								<h:outputText value="So Cust Addr No"/>
							</f:facet>
							<h:link outcome="/sdSaleOrderCustAddr/view">
								<f:param name="id" value="#{_item.id}"/>
								<h:outputText id="itemSoCustAddrNo" value="#{_item.soCustAddrNo}"/>
							</h:link>
							<f:facet name="footer">
								<h:inputText id="sdSaleOrderCustAddrBeanAddSoCustAddrNo" maxLength="20" value="#{sdSaleOrderCustAddrBean.add.soCustAddrNo}"/>
								<h:message for="sdSaleOrderCustAddrBeanAddSoCustAddrNo" styleClass="error"/>
							</f:facet>
						</h:column>
						<h:column>
							<f:facet name="header">
								<h:outputText value="So Cust Addr Moo"/>
							</f:facet>
							<h:link outcome="/sdSaleOrderCustAddr/view">
								<f:param name="id" value="#{_item.id}"/>
								<h:outputText id="itemSoCustAddrMoo" value="#{_item.soCustAddrMoo}"/>
							</h:link>
							<f:facet name="footer">
								<h:inputText id="sdSaleOrderCustAddrBeanAddSoCustAddrMoo" maxLength="10" value="#{sdSaleOrderCustAddrBean.add.soCustAddrMoo}"/>
								<h:message for="sdSaleOrderCustAddrBeanAddSoCustAddrMoo" styleClass="error"/>
							</f:facet>
						</h:column>
						<h:column>
							<f:facet name="header">
								<h:outputText value="So Cust Addr Soi"/>
							</f:facet>
							<h:link outcome="/sdSaleOrderCustAddr/view">
								<f:param name="id" value="#{_item.id}"/>
								<h:outputText id="itemSoCustAddrSoi" value="#{_item.soCustAddrSoi}"/>
							</h:link>
							<f:facet name="footer">
								<h:inputText id="sdSaleOrderCustAddrBeanAddSoCustAddrSoi" maxLength="100" value="#{sdSaleOrderCustAddrBean.add.soCustAddrSoi}"/>
								<h:message for="sdSaleOrderCustAddrBeanAddSoCustAddrSoi" styleClass="error"/>
							</f:facet>
						</h:column>
						<h:column footerClass="remove-column" headerClass="remove-column">
							<h:commandLink action="#{_collection.remove(_item)}" styleClass="remove-button"/>
							<f:facet name="footer">
								<h:commandLink action="#{_collection.add(sdSaleOrderCustAddrBean.added)}" id="sdSaleOrderBeanSdSaleOrderSdSaleOrderCustAddrsAdd" styleClass="add-button">
									<f:setPropertyActionListener target="#{sdSaleOrderCustAddrBean.add.sdSaleOrder}" value="#{sdSaleOrderBean.sdSaleOrder}"/>
								</h:commandLink>
							</f:facet>
						</h:column>
					</h:dataTable>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="sdSaleOrderBeanSdSaleOrderSdSaleOrderItems" value="Sd Sale Order Items:"/>
				<h:panelGroup>
					<ui:param name="_collection" value="#{sdSaleOrderBean.sdSaleOrder.sdSaleOrderItems}"/>
					<h:dataTable id="sdSaleOrderBeanSdSaleOrderSdSaleOrderItems" styleClass="data-table" value="#{forgeview:asList(_collection)}" var="_item">
						<h:column>
							<f:facet name="header">
								<h:outputText value="So Qty"/>
							</f:facet>
							<h:link outcome="/sdSaleOrderItem/view">
								<f:param name="id" value="#{_item.id}"/>
								<h:outputText id="itemSoQty" value="#{_item.soQty}"/>
							</h:link>
							<f:facet name="footer">
								<h:inputText id="sdSaleOrderItemBeanAddSoQty" value="#{sdSaleOrderItemBean.add.soQty}"/>
								<h:message for="sdSaleOrderItemBeanAddSoQty" styleClass="error"/>
							</f:facet>
						</h:column>
						<h:column>
							<f:facet name="header">
								<h:outputText value="So Ppu"/>
							</f:facet>
							<h:link outcome="/sdSaleOrderItem/view">
								<f:param name="id" value="#{_item.id}"/>
								<h:outputText id="itemSoPpu" value="#{_item.soPpu}"/>
							</h:link>
							<f:facet name="footer">
								<h:inputText id="sdSaleOrderItemBeanAddSoPpu" value="#{sdSaleOrderItemBean.add.soPpu}"/>
								<h:message for="sdSaleOrderItemBeanAddSoPpu" styleClass="error"/>
							</f:facet>
						</h:column>
						<h:column>
							<f:facet name="header">
								<h:outputText value="So Status Inc Vat"/>
							</f:facet>
							<h:link outcome="/sdSaleOrderItem/view">
								<f:param name="id" value="#{_item.id}"/>
								<h:outputText id="itemSoStatusIncVat" value="#{_item.soStatusIncVat}"/>
							</h:link>
							<f:facet name="footer">
								<h:inputText id="sdSaleOrderItemBeanAddSoStatusIncVat" value="#{sdSaleOrderItemBean.add.soStatusIncVat}"/>
								<h:message for="sdSaleOrderItemBeanAddSoStatusIncVat" styleClass="error"/>
							</f:facet>
						</h:column>
						<h:column>
							<f:facet name="header">
								<h:outputText value="So Vat Perc Val"/>
							</f:facet>
							<h:link outcome="/sdSaleOrderItem/view">
								<f:param name="id" value="#{_item.id}"/>
								<h:outputText id="itemSoVatPercVal" value="#{_item.soVatPercVal}"/>
							</h:link>
							<f:facet name="footer">
								<h:inputText id="sdSaleOrderItemBeanAddSoVatPercVal" value="#{sdSaleOrderItemBean.add.soVatPercVal}"/>
								<h:message for="sdSaleOrderItemBeanAddSoVatPercVal" styleClass="error"/>
							</f:facet>
						</h:column>
						<h:column>
							<f:facet name="header">
								<h:outputText value="So Vat"/>
							</f:facet>
							<h:link outcome="/sdSaleOrderItem/view">
								<f:param name="id" value="#{_item.id}"/>
								<h:outputText id="itemSoVat" value="#{_item.soVat}"/>
							</h:link>
							<f:facet name="footer">
								<h:inputText id="sdSaleOrderItemBeanAddSoVat" value="#{sdSaleOrderItemBean.add.soVat}"/>
								<h:message for="sdSaleOrderItemBeanAddSoVat" styleClass="error"/>
							</f:facet>
						</h:column>
						<h:column footerClass="remove-column" headerClass="remove-column">
							<h:commandLink action="#{_collection.remove(_item)}" styleClass="remove-button"/>
							<f:facet name="footer">
								<h:commandLink action="#{_collection.add(sdSaleOrderItemBean.added)}" id="sdSaleOrderBeanSdSaleOrderSdSaleOrderItemsAdd" styleClass="add-button">
									<f:setPropertyActionListener target="#{sdSaleOrderItemBean.add.sdSaleOrder}" value="#{sdSaleOrderBean.sdSaleOrder}"/>
								</h:commandLink>
							</f:facet>
						</h:column>
					</h:dataTable>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="sdSaleOrderBeanSdSaleOrderSdSaleOrderCustContacts" value="Sd Sale Order Cust Contacts:"/>
				<h:panelGroup>
					<ui:param name="_collection" value="#{sdSaleOrderBean.sdSaleOrder.sdSaleOrderCustContacts}"/>
					<h:dataTable id="sdSaleOrderBeanSdSaleOrderSdSaleOrderCustContacts" styleClass="data-table" value="#{forgeview:asList(_collection)}" var="_item">
						<h:column>
							<f:facet name="header">
								<h:outputText value="Sys Title Name"/>
							</f:facet>
							<h:link outcome="/sdSaleOrderCustContact/view">
								<f:param name="id" value="#{_item.id}"/>
								<h:outputText id="forgeviewdisplayitemSysTitleName" value="#{forgeview:display(_item.sysTitleName)}"/>
							</h:link>
							<f:facet name="footer">
								<h:selectOneMenu converter="#{sysTitleNameBean.converter}" id="sdSaleOrderCustContactBeanAddSysTitleName" value="#{sdSaleOrderCustContactBean.add.sysTitleName}">
									<f:selectItem/>
									<f:selectItems itemLabel="#{forgeview:display(_item)}" itemValue="#{_item}" value="#{sysTitleNameBean.all}" var="_item"/>
								</h:selectOneMenu>
								<h:message for="sdSaleOrderCustContactBeanAddSysTitleName" styleClass="error"/>
							</f:facet>
						</h:column>
						<h:column>
							<f:facet name="header">
								<h:outputText value="So Cust Contact First Name"/>
							</f:facet>
							<h:link outcome="/sdSaleOrderCustContact/view">
								<f:param name="id" value="#{_item.id}"/>
								<h:outputText id="itemSoCustContactFirstName" value="#{_item.soCustContactFirstName}"/>
							</h:link>
							<f:facet name="footer">
								<h:inputText id="sdSaleOrderCustContactBeanAddSoCustContactFirstName" maxLength="50" value="#{sdSaleOrderCustContactBean.add.soCustContactFirstName}"/>
								<h:message for="sdSaleOrderCustContactBeanAddSoCustContactFirstName" styleClass="error"/>
							</f:facet>
						</h:column>
						<h:column>
							<f:facet name="header">
								<h:outputText value="So Cust Contact Mid Name"/>
							</f:facet>
							<h:link outcome="/sdSaleOrderCustContact/view">
								<f:param name="id" value="#{_item.id}"/>
								<h:outputText id="itemSoCustContactMidName" value="#{_item.soCustContactMidName}"/>
							</h:link>
							<f:facet name="footer">
								<h:inputText id="sdSaleOrderCustContactBeanAddSoCustContactMidName" maxLength="50" value="#{sdSaleOrderCustContactBean.add.soCustContactMidName}"/>
								<h:message for="sdSaleOrderCustContactBeanAddSoCustContactMidName" styleClass="error"/>
							</f:facet>
						</h:column>
						<h:column>
							<f:facet name="header">
								<h:outputText value="So Cust Contact Last Name"/>
							</f:facet>
							<h:link outcome="/sdSaleOrderCustContact/view">
								<f:param name="id" value="#{_item.id}"/>
								<h:outputText id="itemSoCustContactLastName" value="#{_item.soCustContactLastName}"/>
							</h:link>
							<f:facet name="footer">
								<h:inputText id="sdSaleOrderCustContactBeanAddSoCustContactLastName" maxLength="50" value="#{sdSaleOrderCustContactBean.add.soCustContactLastName}"/>
								<h:message for="sdSaleOrderCustContactBeanAddSoCustContactLastName" styleClass="error"/>
							</f:facet>
						</h:column>
						<h:column>
							<f:facet name="header">
								<h:outputText value="So Cust Contact Phone No"/>
							</f:facet>
							<h:link outcome="/sdSaleOrderCustContact/view">
								<f:param name="id" value="#{_item.id}"/>
								<h:outputText id="itemSoCustContactPhoneNo" value="#{_item.soCustContactPhoneNo}"/>
							</h:link>
							<f:facet name="footer">
								<h:inputText id="sdSaleOrderCustContactBeanAddSoCustContactPhoneNo" maxLength="20" value="#{sdSaleOrderCustContactBean.add.soCustContactPhoneNo}"/>
								<h:message for="sdSaleOrderCustContactBeanAddSoCustContactPhoneNo" styleClass="error"/>
							</f:facet>
						</h:column>
						<h:column footerClass="remove-column" headerClass="remove-column">
							<h:commandLink action="#{_collection.remove(_item)}" styleClass="remove-button"/>
							<f:facet name="footer">
								<h:commandLink action="#{_collection.add(sdSaleOrderCustContactBean.added)}" id="sdSaleOrderBeanSdSaleOrderSdSaleOrderCustContactsAdd" styleClass="add-button">
									<f:setPropertyActionListener target="#{sdSaleOrderCustContactBean.add.sdSaleOrder}" value="#{sdSaleOrderBean.sdSaleOrder}"/>
								</h:commandLink>
							</f:facet>
						</h:column>
					</h:dataTable>
				</h:panelGroup>
				<h:outputText/>
			</h:panelGrid>

			<div class="buttons">
				<h:commandLink value="Save" action="#{sdSaleOrderBean.update}" styleClass="btn btn-primary"/>
				<c:choose>
					<c:when test="#{!empty sdSaleOrderBean.id}">
						<h:link value="Cancel" outcome="view" styleClass="btn btn-primary">
							<f:param name="id" value="#{sdSaleOrderBean.id}"/>
						</h:link>
						<h:commandLink value="Delete" action="#{sdSaleOrderBean.delete}" styleClass="btn btn-primary"/>
					</c:when>
					<c:otherwise>
						<h:link value="Cancel" outcome="search" styleClass="btn btn-primary"/>
					</c:otherwise>
				</c:choose>
			</div>
		</h:form>
	</ui:define>

</ui:composition>